#pragma once

#include "Color.h"

namespace Graphics
{
	class D3DDevice;
}

namespace Graphics
{
class RenderTexture
{
public:
	RenderTexture(void);
	virtual ~RenderTexture(void);
	bool Initialize(int textureWidth, int textureHeight);
	void Deinitialize();
	void SetRenderTarget();
	void ClearRenderTarget(Color color);
	ID3D11ShaderResourceView* GetShaderResourceView();
	
private:
	bool SetupRenderTargetTexture(D3DDevice* device);
	bool SetupRenderTargetView(D3DDevice* device);
	bool SetupShaderResourceView(D3DDevice* device);

private:
	ID3D11Texture2D* mRenderTargetTexture;
	ID3D11RenderTargetView* mRenderTargetView;
	ID3D11ShaderResourceView* mShaderResourceView;
	int mTextureWidth;
	int mTextureHeight;
};
}